#include "fxcc/imgui/Editor.h"
#include "fxcc/core/graph/common/Node.h"

using namespace fxcc::graph::common;
using namespace fxcc::imgui;

template <>
bool Editor::Edit(const std::string &label, Node &inst)
{
    //EditInst<std::string>("name", inst.m_Name);
    int index = 0;
    ImGui::Text(label.c_str());
    if (TreeNode(inst.m_Name.c_str(), inst.m_ImguiFlag, index++))
    {
        for (auto& child : inst.m_Childern)
        {
            EditInst<Node>("child", *child);
        }
        ImGui::TreePop();
    }

    return false;
}
